1. Field of the Invention
The present invention relates to video signal processing and, more particularly, to improved 2:2 and 3:2 pull-down detection techniques. The techniques of the present invention can, for example, be used when converting an interlaced video signal into a progressive video signal.
2. Related Art
There are two common types of video display systems: interlaced display systems and progressive display systems. Interlaced display systems use interlaced video signals. An interlaced video signal includes even fields, which contain one half of the total lines displayed on a display, and odd fields, which contain the other half of the total lines displayed on the display. The even fields and the odd fields of the interlaced video signal are alternately scanned onto the display to generate an image. By contrast, progressive display systems use progressive video signals. A progressive video signal includes frames, each of which contains all of the lines displayed on a display. The frames of the progressive video signal are successively scanned onto the display to generate an image.
Progressive display systems are becoming increasingly popular since they produce a higher quality image compared to interlaced display systems. However, many video signals that exist today are interlaced video signals. Thus, to display the interlaced video signals on a progressive display system, the interlaced video signal must be converted into a progressive video signal. This conversion process is known as video deinterlacing and is typically performed by a video deinterlacer circuit. Video deinterlacing is also referred to as line doubling and video deinterlacer circuits are also referred to as line doubler circuits.
Two common video deinterlacing techniques are referred to as the merging technique (also referred to as weaving) and the interpolation technique (also referred to as bobbing). According to the merging technique, the lines of the even and odd fields of an interlaced video signal are weaved (or interleaved) to generate a single frame. The merging technique is well suited for relatively static images, but produces highly objectionable artifacts when significant motion is present in the image. According to the interpolation technique, the interpolated lines (i.e., the missing lines) between the field lines are generated (usually by averaging the field pixels in the field lines above and below each interpolated line) and combined with the field lines to generate a single frame. The interpolation technique is well suited for video with high motion content, but produces a clearly visible loss of vertical resolution for relatively static images. Motion adaptive techniques have been developed so that when there is relatively little motion in an image, the merging technique is used, and when there is a relatively large amount of motion in an image, the interpolation technique is used.
Interlaced video signals can have different field rates, such as 50 fields/second or 60 fields/second, and interlaced video signals can be generated from different sources, such as film, cartoons, computer graphics, or computer animation. Film, which includes 24 frames that are displayed every second, is typically converted into a 50 field/second interlaced video signal using a well-known technique referred to as 2:2 pull-down and is then displayed at a rate 4% faster than the original rate. Film is typically converted into a 60 field/second interlaced video signal using a well-known technique referred to as 3:2 pull-down (also referred to as 2:3 pull-down). Computer animation is often created at 30 frames/second and is converted into 60 interlaced fields/second using 2:2 pull-down.
FIG. 1 illustrates the 2:2 pull-down technique. Using 2:2 pull-down, film frame A is converted into even interlaced video field A1 and odd interlaced video field A2; film frame B is converted into even interlaced video field B1 and odd interlaced video field B2; film frame C is converted into even interlaced video field C1 and odd interlaced video field C2; film frame D is converted into even interlaced video field D1 and odd interlaced video field D2, and so on. Note that it is also possible that film frame A will be converted into odd interlaced video field A1 and even interlaced video field A2, etc. Thus, using 2:2 pull-down together with a 4% speed up, 24 film frames are converted into 50 interlaced video fields every second.
When converting an interlaced video signal into a progressive video signal, it is desirable to determine whether the interlaced video signal was generated using 2:2 pull-down. This is because if the interlaced video signal was generated using 2:2 pull-down, the video deinterlacer can use the merging technique to merge consecutive fields (i.e., fields that were generated from the same film frame such as A1 and A2, B1 and B2, C1 and C2, and so on) to generate an essentially perfect progressive video signal.
Conventional video deinterlacer systems use a 2:2 pull-down field motion detector circuit to determine whether an interlaced video signal was generated using 2:2 pull-down. The 2:2 pull-down field motion detector circuit compares consecutive fields of the interlaced video signal and generates a comparison value for each comparison. If the 2:2 pull-down field motion detector circuit detects a 2:2 pull-down field pattern, then the 2:2 pull-down field motion detector circuit generates a signal that indicates that the interlaced video signal was generated using 2:2 pull-down. As used herein, a 2:2 pull-down field pattern is a repeating sequence of 1 small comparison value followed by 1 large comparison value. Another signal is generated that indicates the 2:2 pull-down sequence. On the other hand, if the 2:2 pull-down field motion detector circuit does not detect a 2:2 pull-down field pattern, then the 2:2 pull-down field motion detector circuit generates a signal that indicates that the interlaced video signal was not generated using 2:2 pull-down. Note that a small comparison value indicates a good correlation between consecutive fields and a large comparison value indicates a poor correlation between consecutive fields. As used herein, a comparison value is the difference between two fields, and a difference value is the difference between two comparison values.
The technique employed by a conventional 2:2 pull-down field motion detector circuit is illustrated by the following example. Suppose that an interlaced video signal has the following field sequence:    A1 A2 B1 B2 C1 C2 D1 D2 E1 E2 F1 F2 G1 G2 . . .
Fields A1 and A2 were generated from film frame A; fields B1 and B2 were generated from film frame B; fields C1 and C2 were generated from film frame C; fields D1 and D2 were generated from film frame D, and so on. The 2:2 pull-down field motion detector circuit compares consecutive fields of the interlaced video signal yielding a repeating pattern of 1 small comparison value followed by 1 large comparison value:    A1−A2=CV1 (which is a small difference)    A2−B1=CV2 (which is a large difference)    B1−B2=CV3 (which is a small difference)    B2−C1=CV4 (which is a large difference)    C1−C2=CV5 (which is a small difference)    C2−D1=CV6 (which is a large difference)    D1−D2=CV7 (which is a small difference)    D2−E1=CV8 (which is a large difference)    E1−E2=CV9 (which is a small difference)    E2−F1=CV10 (which is a large difference)    F1−F2=CV11 (which is a small difference)    F2−G1=CV12 (which is a large difference)    G1−G2=CV13 (which is a small difference)
The 2:2 pull-down field motion detector circuit detects the repeating 2-field sequence of 1 small comparison value followed by 1 large comparison value and generates a signal which indicates that the interlaced video signal was generated using 2:2 pull-down. If a repeating 2-field sequence of 1 small comparison value followed by 1 large comparison value is not detected, the 2:2 pull-down field motion detector circuit generates a signal which indicates that the interlaced video signal was not generated using 2:2 pull-down.
The signal that indicates whether or not the interlaced video signal was generated using 2:2 pull-down is then provided to a deinterlacer circuit. If the indication signal indicates that a 2:2 pull-down field pattern has been detected, the deinterlacer circuit uses the merging technique to convert the interlaced video signal into a progressive video signal. On the other hand, if the indication signal indicates that a 2:2 pull-down field pattern has not been detected, the deinterlacer circuit typically uses a motion adaptive technique to convert the interlaced video signal into a progressive video signal.
One problem with the 2:2 pull-down field motion detector circuit is that sometimes the 2:2 pull-down field motion detector circuit falsely detects a 2:2 pull-down field pattern. As those of skill in the art will recognize, a direct difference between the consecutive fields cannot be used to generate the comparison values since there is a vertical spatial difference between the pixels in the consecutive fields. As such, more complex comparison techniques (e.g., techniques that use vertical high pass filters to compare the high frequencies within the consecutive fields) are used to compare the consecutive fields and thus generate the comparison values. Unfortunately, these comparison techniques are susceptible to falsely detecting a 2:2 pull-down field pattern. This is undesirable since the deinterlacer circuit merges the consecutive fields in the interlaced video signal when a 2:2 pull-down field pattern is falsely detected. Since the consecutive fields in the interlaced video signal are from different points in time and are merged, highly objectionable artifacts (i.e., feathering or combing) appear in the displayed image.
FIG. 2 illustrates the 3:2 pull-down technique. Using 3:2 pull-down, film frame A is converted into even interlaced video field A1, odd interlaced video field A2, and even interlaced video field A3 which is identical to field A1; film frame B is converted into odd interlaced video field B1 and even interlaced video field B2; film frame C is converted into odd interlaced video field C1, even interlaced video field C2, and odd interlaced video field C3 which is identical to field C1; film frame D is converted into even interlaced video field D1 and odd interlaced video field D2, and so on. Thus, using 3:2 pull-down 24 film frames are converted into 60 interlaced video fields every second.
When converting an interlaced video signal into a progressive video signal, it is desirable to determine whether the interlaced video signal was generated using 3:2 pull-down. This is because if the interlaced video signal was generated using 3:2 pull-down, the video deinterlacer can use the merging technique to merge consecutive fields (i.e., fields that were generated from the same film frame) to generate an essentially perfect progressive video signal.
Conventional video deinterlacer systems use a 3:2 pull-down frame motion detector circuit to determine whether an interlaced video signal was generated using 3:2 pull-down. The 3:2 pull-down frame motion detector circuit compares consecutive fields of the interlaced video signal having the same parity (i.e., two even fields or two odd fields) and generates a comparison value for each comparison. If a repeating 5 field sequence of 1 small comparison value followed by 4 consecutive large comparison values is detected, the 3:2 pull-down frame motion detector circuit generates a signal which indicates that the interlaced video signal was generated using 3:2 pull-down. Another signal is generated which indicates the 3:2 pull-down sequence. On the other hand, if a repeating 5 field sequence of 1 small comparison value followed by 4 large comparison values is not detected, the 3:2 pull-down frame motion detector circuit generates a signal which indicates that the interlaced video signal was not generated using 3:2 pull-down.
The technique employed by a conventional 3:2 pull-down frame motion detector circuit is illustrated by the following example. Suppose that an interlaced video signal has the following field sequence:    A1 A2 A3 B1 B2 C1 C2 C3 D1 D2 E1 E2 E3 F1 F2 G1 G2 G3 . . .
Fields A1, A2 and A3 were generated from film frame A; fields B1 and B2 were generated from film frame B; fields C1, C2, and C3 were generated from film frame C; fields D1 and D2 were generated from film frame D, and so on. The 3:2 pull-down frame motion detector circuit compares consecutive fields of the interlaced video signal having the same parity yielding a repeating pattern of 1 small comparison value followed by 4 consecutive large comparison values:    A1−A3=CV1 (which is a small difference)    A2−B1=CV2 (which is a large difference)    A3−B2=CV3 (which is a large difference)    B1−C1=CV4 (which is a large difference)    B2−C2=CV5 (which is a large difference)    C1−C3=CV6 (which is a small difference)    C2−D1=CV7 (which is a large difference)    C3−D2=CV8 (which is a large difference)    D1−E1=CV9 (which is a large difference)    D2−E2=CV10 (which is a large difference)    E1−E3=CV11 (which is a small difference)    E2−F1=CV12 (which is a large difference)    E3−F2=CV13 (which is a large difference)    F1−G1=CV14 (which is a large difference)    F2−G2=CV15 (which is a large difference)    G1−G3=CV16 (which is a small difference)
The 3:2 pull-down frame motion detector circuit detects this repeating 5 field sequence of 1 small comparison value followed by 4 consecutive large comparison values and generates a signal which indicates that the interlaced video signal was generated using 3:2 pull-down. If a repeating 5 field sequence of 1 small comparison value followed by 4 consecutive large comparison values is not detected, the 3:2 pull-down frame motion detector circuit generates a signal which indicates that the interlaced video signal was not generated using 3:2 pull-down.
The signal that indicates whether or not the interlaced video signal was generated using 3:2 pull-down is then provided to a deinterlacer circuit along with the interlaced video signal. If the indication signal indicates that the interlaced video signal was generated using 3:2 pull-down, the deinterlacer circuit uses the merging technique to convert the interlaced video signal into a progressive video signal. On the other hand, if the indication signal indicates that the interlaced video signal was not generated using 3:2 pull-down, the deinterlacer circuit typically uses a motion adaptive technique to convert the interlaced video signal into a progressive video signal.
Interlaced video signals that have been generated using 3:2 pull-down are often edited, for example, to insert a television commercial, to cut a scene out of a motion picture, to overlay computer graphics, or to overlay sub-titles, such as credits. Edits that do not occur on a film frame line result in what is commonly referred to as a “bad edit.”
Some conventional video deinterlacers do not include the ability to detect bad edits. As a result, it can take up to 5 fields to detect the bad edit. This is illustrated by the following example. Suppose that an interlaced video signal has the following field sequence:    A1 A2 A3 B1 B2 C1 C2 C3 D1 D2 E1 E2 E3 F1 F2 G1 G2 G3 H1 H2 I1 I2 I3 . . .
Suppose further that the interlaced video signal is edited such that it includes a bad edit resulting in the following sequence:    A1 A2 A3 B1 B2 C1 C2 C3 D1 D2 E1 E2 E3 G3 H1 H2 I1 I2 I3 . . .
In this sequence, the bad edit occurs between fields E3 and G3. In other words, fields F1, F2, G1, and G2 have been edited out of the interlaced video signal. A conventional video deinterlacer circuit that does not have the ability to detect a bad edit compares consecutive fields of the interlaced video signal having the same parity yielding the following pattern of comparison values:    A1−A3=CV1 (which is a small difference)    A2−B1=CV2 (which is a large difference)    A3−B2=CV3 (which is a large difference)    B1−C1=CV4 (which is a large difference)    B2−C2=CV5 (which is a large difference)    C1−C3=CV6 (which is a small difference)    C2−D1=CV7 (which is a large difference)    C3−D2=CV8 (which is a large difference)    D1−E1=CV9 (which is a large difference)    D2−E2=CV10 (which is a large difference)    E1−E3=CV11 (which is a small difference)    E2−G3=CV12 (which is a large difference)    E3−H1=CV13 (which is a large difference)    G3−H2=CV14 (which is a large difference)    H1−I1=CV15 (which is a large difference)    H2−I2=CV16 (which is a large difference)    I1−I3=CV17 (which is a small difference)
This sequence of comparison values has an initial 10 comparison values which consist of 2 repeating sets of 5 field sequences of 1 small comparison value followed by 4 consecutive large comparison values. However, after this initial 10 comparison values, the sequence of comparison values ceases to have a 5 field sequence of 1 small comparison value followed by 4 consecutive large comparison values. Rather, the sequence now has 1 small comparison value followed by 5 consecutive large comparison values since it includes a bad edit. Unfortunately, conventional video deinterlacers cannot detect the bad edit until comparison value CV16 is generated. Since the conventional 3:2 pull-down motion detector circuit initially detects 3:2 pull-down, the video deinterlacer circuit continues to use the merging technique when generating the progressive video signal. After comparison value CV11, this causes fields from different points in time to be merged together when generating the progressive video signal and thus ultimately results in an image that includes highly objectionable artifacts (i.e., feathering or combing).
Some conventional video deinterlacers include bad edit detection circuits that can detect bad edits earlier using “look-ahead” techniques. A disadvantage with such look-ahead techniques is that they require up to six fields to be simultaneously stored in memory to detect bad edits. This requires a large amount of memory, which is expensive from both an implementation and a production standpoint and thus is undesirable.
Another technique used to detect 3:2 pull-down is to use a 3:2 pull-down field motion detector circuit. The 3:2 pull-down field motion detector circuit compares consecutive fields of the interlaced video signal having different parities yielding the following pattern:    A1−A2=CV1 (which is a small difference)    A2−A3=CV2 (which is a small difference)    A3−B1=CV3 (which is a large difference)    B1−B2=CV4 (which is a small difference)    B2−C1=CV5 (which is a large difference)    C1−C2=CV6 (which is a small difference)    C2−C3=CV7 (which is a small difference)    C3−D1=CV8 (which is a large difference)    D1−D2=CV9 (which is a small difference)    D2−E1=CV10 (which is a large difference)    E1−E2=CV11 (which is a small difference)    E2−E3=CV12 (which is a small difference)    E3−F1=CV13 (which is a large difference)    F1−F2=CV14 (which is a small difference)    F2−G1=CV15 (which is a large difference)    G1−G2=CV16 (which is a small difference)
The 3:2 pull-down field motion detector circuit detects the following repeating 5 field sequence: small difference, small difference, large difference, small difference, large difference. Bad edits can be fairly reliably detected using a 3:2 pull-down field motion detector circuit. However, 3:2 pull-down field motion detector circuits are problematic since often times they do not correctly detect when an interlaced video signal was generated using 3:2 pull-down.
Accordingly, what is needed are improved 2:2 pull-down and 3:2 pull-down detection techniques.